<link rel="stylesheet" type="text/css" href="/css/classic-accordion.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/css/classic-accordion-index.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/css/style1.css" media="screen"/>

<script type="text/javascript" src="/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="/js/jquery.classicAccordion.min.js"></script>
<script type="text/javascript">
	
	var accordion;
	
	$(document).ready(function(){
		accordion = $('.accordion').classicAccordion(
										{	width:1002, 
											height:320, 
											slideshow:true, 
											shadow:true, 
											alignType:'centerCenter', 
											closedPanelSize:40,
											panelProperties:{
												0:{captionWidth:200, captionHeight:35, captionTop:30, captionLeft:30},
												2:{captionWidth:380, captionHeight:40, captionTop:330, captionLeft:30},
												4:{captionWidth:150, captionHeight:120, captionTop:270, captionLeft:600},
												7:{captionWidth:300, captionHeight:35, captionTop:180, captionLeft:250},
												8:{captionWidth:380, captionHeight:40, captionTop:330, captionLeft:30},
												10:{captionWidth:150, captionHeight:120, captionTop:30, captionLeft:620}
											}
										});
		
		accordion.openPanel(0);
	});
	
</script>
<ul class="accordion">
	<?
		$banners = Banner::model()->findAll('b_isdel = 1 order by b_order asc');
		foreach($banners as $b){
	?>
	<li>
		<a href = "<?=$b->b_link?>"><img src="<?=$b->b_source?>"/></a>
		<div class="caption"><?=$b->b_description?></div>
	</li>
	<?}?>
</ul>
<div class = 'clear'></div>
<style type = "text/css">
/**tabs**/
.tabPanel{font-size:14px;border-top:2px solid white;width:1002px;overflow:hidden;padding:0px;margin:0px;}
.tabPanel ul{height:30px;font-size:14px;width:1002px;overflow:hidden;}
.tabPanel ul li{
	float:left;
	margin:0 2px 0 0;
	font-size:14px;
	height:30px;
	line-height:30px;
	width:334px;
	text-align:center;
	cursor:pointer;
	color:white;
	border-radius:4px 4px 0 0;
	-moz-border-radius:4px 4px 0 0;
	-webkit-border-radius:4px 4px 0 0;
	behavior:url(PIE.htc);
	font-weight:bold;
}
.tabPanel ul li a{display:inline-block;float:right;color:white;font-weight:normal;font-size:12px;}
.tabPanel .hit{
	cursor:pointer;
	text-shadow:0 1px 0 #fff;
	background:-webkit-gradient(linear, left top, left bottom, from(#e1e1e1), to(#fff));
	background:-moz-linear-gradient(top, #e1e1e1, #fff);
}
.panes{overflow:hidden;}
.pane{min-height:100px;background-color:#fff;display:block;color:#FFFFFF;padding:0px;margin:0px;overflow:hidden;}
.pane p{padding:0px;}
.pane h4{padding:15px 15px 0 10px;font-size:14px;font-weight:bold;}
.pane div.dm {float:left;border:1px solid #FFFFFF;text-align:left;width:487px;height:280px;background:#8D9530;}
.pane div.dt {float:left;border:1px solid #FFFFFF;text-align:left;width:253px;height:280px;background:#666;padding:0px 0px;}
.pane a{color:white;}
</style>
<script type="text/javascript">
/* $(function(){	
	$('.tabPanel ul li').click(function(){
		$(this).addClass('hit').siblings().removeClass('hit');
		$('.panes>div:eq('+$(this).index()+')').show().siblings().hide();	
	});
		
	$('.tabPanel ul li').mouseover(function(){
		$(this).addClass('hit').siblings().removeClass('hit');
		$('.panes>div:eq('+$(this).index()+')').show().siblings().hide();	
	})
}) */
</script>
<div class="tabPanel">
	<ul>
		<li class="hit" style = "background:#8D9530;width:254px;">公司动态/COMPANY</li>
		<li style = "background:#37729E;width:487px;">产品动态/PRODUCT</li>
		<li style = "background:#A78851;width:257px;border-right:0px;">新闻动态/NEWS<a href="<?=Yii::app()->createUrl('news/index')?>" style="color:white">更多...</a></li>
	</ul>
	<? 
		$criteria = new CDbCriteria;
		$criteria->order = 'p_id desc';
		$criteria->compare('p_isdel',1);
		$criteria->limit=14;
		$product = Product::model()->findAll($criteria);
		$criteria = new CDbCriteria;
		$criteria->order = 'n_id desc';
		$criteria->compare('n_isdel',1);
		$criteria->limit=7;
		$news = News::model()->findAll($criteria);
	?>
	<div class="panes">
		<div class="pane">
			
			<div class='dt' style = "background:#8D9530;border-left:0px;width:254px;">
				<?			
					$keyname = 'gongsidongtaiB';
					Contenter::model()->ifexsit($keyname);
					$modelA = Contenter::model()->find("c_name='{$keyname}'");
				?>
				<a href = "<?=isset($modelA->c_value)?Yii::app()->createUrl('site/gongsidongtaiB'):''?>"><img src = '/images/sbanner/gongsi.jpg' style = "width:254px;height:100px;margin-bottom:0px"/></a>
				<div style = "padding:0px 4px;width:246px;height:178px;float:left;">
				<?
				$keyname = 'gongsidongtai';
				Contenter::model()->ifexsit($keyname);
				$model = Contenter::model()->find("c_name='{$keyname}'");
				echo $model->c_value;;
				?>
				</div>
			</div>	
			<div  class='dm' style = "background:#37729E">
				<?			
					$keyname = 'chanpindongtaiB';
					Contenter::model()->ifexsit($keyname);
					$modelA = Contenter::model()->find("c_name='{$keyname}'");
				?>
				<a href = "<?=isset($modelA->c_value)?Yii::app()->createUrl('site/chanpindongtaiB'):''?>"><img src = '/images/sbanner/chanpin.jpg' style = "width:253px;height:280px;display:block;float:left;"/></a>
				<div style = "padding:0px 4px;width:226px;height:280px;float:left;">
				<?
				$keyname = 'chanpindongtai';
				Contenter::model()->ifexsit($keyname);
				$model = Contenter::model()->find("c_name='{$keyname}'");
				echo $model->c_value;
				?>
				</div>
			</div>
			<div class='dt' style = "background:#A78851;width:257px;border-right:0px;margin:0px;padding:0px;">
				<div style = "float:right;width:245px;padding:5px;margin:0px;">
				<? foreach($news as $n){?>
					<a href = "<?=Yii::app()->createUrl('news/view',array('id'=>$n->n_id))?>"><img src = "/images/right.gif" /> <?=Common::strCut($n->n_title,39)?></a><br/>
				<? }?>
				</div>
			</div>	
			<div class='clear'></div>
		</div>
	</div>
</div>





